In Surah Al-Fatiha, the first chapter of the Quran, we read about God being Rahman and Rahim and that His mercy is for all beings. So how can one justify the permanence of chastisement for some unbelievers in the hereafter?
Some refer to the intention of unbelievers, saying because they had the intention to keep committing sins in this world, their punishment in the hereafter continues. But punishment based only on intention is not acceptable according to Sharia.
Some others say that Khulud (permanently being in a place) in hell means remaining there for a long time and that is acceptable given that some sins like Kufr are very grave. But this is not compatible with the principles of Fiqh either.
Others, meanwhile, say permanence of punishment is conditioned on the will of God, that is to say, the punishment only lasts as long as God wants.
In interpretation of the Quran, one major principle is that God is not unjust and another is that the system of the world is based on the law of cause and effect. The permanence of punishment should be understood by having these two in mind.
Now does a sin like Kufr lead to permanent punishment and would it be compatible with God being Adil (just)? One point to remember is that our understanding of Khulud is based on our understanding of time and we are beings that are under the limits of time. But in the hereafter, will we be under these limits again?
If that is not the case, then we in the current situation cannot have a proper understanding on the conditions of that time.
So although the issue of permanent chastisement may not be apparently compatible with God being Rahman and Rahim, we should try to understand it within the framework of the law of cause and effect and the fact that God is not unjust.